How can i create a run-loop function that detects key-presses using Python

welcome to shbcf.ru